package com.slkj.shilixiaoyuanapp.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created  on 2018-08-21
 *
 * @author 唐开阔
 * @describe
 */
public class ToolPurchaseDetailEntity implements Parcelable{


    /**
     * auditId : 232
     * intime : 2018-09-20
     * num : 25
     * count : 22.0
     * auditor : [{"uId":4,"uName":"邓平平","headImg":"http://47.106.8.136:8082/images/school3/head/1533869873953.png","state":0,"refute":""}]
     * goods : 采购测试
     * body : 采购
     * urge : false
     * money : 0.88
     * refute :
     * name : 任浩
     * hoursOfUse : 2018-09-20
     * id : 27
     * state : 0
     * department : {"dId":3,"dName":"收发室"}
     */

    private int auditId;
    private String intime;

    private int myState;

    private int num;
    private double count;
    private String goods;
    private String body;
    private boolean urge;
    private double money;
    private String refute;
    private String name;
    private String hoursOfUse;
    private int id;
    private int state;
    private DepartmentEntity department;
    private List<PeopleEntity> auditor;

    protected ToolPurchaseDetailEntity(Parcel in) {
        auditId = in.readInt();
        intime = in.readString();
        myState = in.readInt();
        num = in.readInt();
        count = in.readDouble();
        goods = in.readString();
        body = in.readString();
        urge = in.readByte() != 0;
        money = in.readDouble();
        refute = in.readString();
        name = in.readString();
        hoursOfUse = in.readString();
        id = in.readInt();
        state = in.readInt();
        department = in.readParcelable(DepartmentEntity.class.getClassLoader());
        auditor = in.createTypedArrayList(PeopleEntity.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(auditId);
        dest.writeString(intime);
        dest.writeInt(myState);
        dest.writeInt(num);
        dest.writeDouble(count);
        dest.writeString(goods);
        dest.writeString(body);
        dest.writeByte((byte) (urge ? 1 : 0));
        dest.writeDouble(money);
        dest.writeString(refute);
        dest.writeString(name);
        dest.writeString(hoursOfUse);
        dest.writeInt(id);
        dest.writeInt(state);
        dest.writeParcelable(department, flags);
        dest.writeTypedList(auditor);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ToolPurchaseDetailEntity> CREATOR = new Creator<ToolPurchaseDetailEntity>() {
        @Override
        public ToolPurchaseDetailEntity createFromParcel(Parcel in) {
            return new ToolPurchaseDetailEntity(in);
        }

        @Override
        public ToolPurchaseDetailEntity[] newArray(int size) {
            return new ToolPurchaseDetailEntity[size];
        }
    };

    public int getMyState() {
        return myState;
    }

    public void setMyState(int myState) {
        this.myState = myState;
    }

    public int getAuditId() {
        return auditId;
    }

    public void setAuditId(int auditId) {
        this.auditId = auditId;
    }

    public String getIntime() {
        return intime;
    }

    public void setIntime(String intime) {
        this.intime = intime;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public double getCount() {
        return count;
    }

    public void setCount(double count) {
        this.count = count;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public boolean isUrge() {
        return urge;
    }

    public void setUrge(boolean urge) {
        this.urge = urge;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getRefute() {
        return refute;
    }

    public void setRefute(String refute) {
        this.refute = refute;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHoursOfUse() {
        return hoursOfUse;
    }

    public void setHoursOfUse(String hoursOfUse) {
        this.hoursOfUse = hoursOfUse;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public DepartmentEntity getDepartment() {
        return department;
    }
    public void setDepartment(DepartmentEntity department) {
        this.department = department;
    }

    public List<PeopleEntity> getAuditor() {
        return auditor;
    }

    public void setAuditor(List<PeopleEntity> auditor) {
        this.auditor = auditor;
    }


}
